class Employee < ActiveRecord::Base
validates_presence_of :fname
validates_presence_of :lname
validates_presence_of :email
validates_presence_of :admin
validates_length_of :fname, :minimum => 1
validates_length_of :lname, :minimum => 1
validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => "email not valid"
def self.current_employees
 find(:all, :conditions => "id > 0", :order => "id" )
end

def self.current_admins
 find(:all, :conditions => "admin = 1", :order => "id")

end

  
end

